<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/short.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	
	<?php Yii::app()->clientScript->registerCoreScript('jquery') ?>
	<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/admin.js"></script>
</head>

<body>

<div class="container" id="page">

	<div id="header">
		<?php if (!Yii::app()->user->isGuest): ?>
		<div class="right mts">
			<?php $this->widget('zii.widgets.CMenu',array(
				'id' => 'topNavMenu',
				'items'=>array(
					array('label'=>'Gii',	'url'=>array('/gii'), 'linkOptions'=>array('target'=>'_blank')),
					array('label'=>'Site', 'url'=>array('/site/index'), 'linkOptions'=>array('target'=>'_blank')),
					array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>Yii::app()->user->logoutUrl)
				)
			)) ?>
		</div>
		<?php endif; ?>
		<div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div>
	</div><!-- header -->

	<?php if (false && !Yii::app()->user->isGuest): ?>
	<div id="mainmenu">
		<?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Config',	'url'=>array('/admin/config'), 'active'=>$this->menu=='config'),
				array('label'=>'Customer',	'url'=>array('/admin/customer'), 'active'=>$this->menu=='customer'),
				array('label'=>'Product',	'url'=>array('/admin/product'), 'active'=>$this->menu=='product'),
				array('label'=>'Order',		'url'=>array('/admin/order'), 'active'=>$this->menu=='order'),
				array('label'=>'Content',	'url'=>array('/admin/page'), 'active'=>$this->menu=='content'),
				array('label'=>'Contact',	'url'=>array('/admin/contact'), 'active'=>$this->menu=='mail'),
				array('label'=>'Report',	'url'=>array('/admin/default/todo'), 'active'=>$this->menu==''),
				// array('label'=>'Blog',		'url'=>array('/admin/default/todo'), 'active'=>$this->menu==''),
				array('label'=>'Gallery',	'url'=>array('/admin/default/todo'), 'active'=>$this->menu==''),
				array('label'=>'Design',	'url'=>array('/admin/default/todo'), 'active'=>$this->menu==''),
				array('label'=>'System',	'url'=>array('/admin/user'), 'active'=>$this->menu=='system'),
			),
		)); ?>
	</div><!-- mainmenu -->
	<?php endif ?>

	<?php echo $content; ?>

	<div class="clear"></div>

	<div id="footer">
		Copyright &copy; <?php echo date('Y'); ?> by Happy Living.<br/>
		All Rights Reserved.<br/>
		<?php echo Yii::powered(); ?>
	</div><!-- footer -->

</div><!-- page -->

</body>
</html>
